
/**
 * 日期转换
 * @param date 
 * @returns 
 */
export default function DateConvert(date: number | Date | string) {
	const d = new Date(date);
	let month: string | number = d.getMonth() + 1;
	let strDate: string | number = d.getDate();
	if (month <= 9) {
		month = `0${month}`;
	}
	if (strDate <= 9) {
		strDate = `0${strDate}`;
	}
	return `${d.getFullYear()}-${month}-${strDate}`;
}
